package com.zrspring.libv2.base;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * @Encoding:UTF-8
 * @ClassName: com.cqnc.msgj.data.adapter
 * @Description: 所有Fragment 页面适配器
 * @Version
 * @Author rui
 * @CreatDate 2016_01_05_15:33 33
 */
public class ViewPagerFragmentAdapterV4 extends FragmentPagerAdapter {

    private ArrayList<Fragment> fragmentsListData;

    public ViewPagerFragmentAdapterV4(FragmentManager fm) {
        super(fm);
    }

    public ViewPagerFragmentAdapterV4(ArrayList<Fragment> fragmentsListData, FragmentManager fm) {
        super(fm);
        this.fragmentsListData=fragmentsListData;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentsListData.get(position);
    }

    @Override
    public int getCount() {
        return fragmentsListData.size();
    }

    @Override
    public int getItemPosition(Object object) {
        return super.getItemPosition(object);
    }
}
